<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>PlainSq - {{ title|e }}</title>

<meta name="HandheldFriendly" content="true" />
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=yes" />

<link rel="stylesheet" href="/main.css" type="text/css" />
<link rel="stylesheet" href="/mobile.css" type="text/css" media="handheld, only screen and (max-device-width:480px)" />

<script type="text/javascript">
// Fix for Android 2.2 CSS media type problem.
// From: http://www.paykin.info/java/android-css-media-reloading/
var isandroid = /android/.test(navigator.userAgent.toLowerCase());
if (isandroid) {
    var cssLink = document.createElement("link");
    cssLink.setAttribute("type", "text/css");
    cssLink.setAttribute("rel", "stylesheet");
    cssLink.setAttribute("href", "/mobile.css");
    document.head.appendChild(cssLink);
}
</script>
</head>

{% from 'macros.htm' import name_fmt %}

<body>
    <div class="header"><a class="button" href="/">Home</a>
	{% if not nolocate %}
	<span class="beforesep"><a class="button" href="/geoloc">Locate</a></span>
	{% endif %}
	- {{ title|e }}
    </div>

    {% if userheader %}
	{% set user = userheader.user %}
	<p><img src="{{ user.photo.prefix|e ~ '36x36' ~ user.photo.suffix|e }}" class="usericon, lefticon" alt="">
	{{ name_fmt(user, button=false) }}
	{% set venueName = '' %}
	{% if user.checkins and user.checkins['items'] is iterable %}
	    {% set venue = user.checkins['items'][0].venue %}
	    {% if venue %}
		@ {{ venue.name|e }}
	    {% endif %}
	{% endif %}
	<br>Loc: {{ [lat, lon] | convcoords }}
	<br style="clear:both">
    {% endif %}

    {% block body %}
    {% endblock %}

    <div class="footer"><a class="button" href="/">Home</a>

	{% if not noabout %}
	<span class="beforesep"><a class="button" href="/about">About</a></span>
	{% endif %}
	{% if not nologout %}
	<span class="beforesep"><a class="button" href="/logout">Log out</a></span>
	{% endif %}
    </div>

    <pre>
{{ debug_json|e }}
    </pre>
</body>
</html>

{# vim:set ft=htmldjango tw=0: #}
